<%@ page contentType="text/html;charset=utf-8" language="java"%>
<!DOCTYPE html>
<%@include file="./common/base.jsp" %>
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<meta name="viewport" content="user-scalable=no" />
<link rel="stylesheet" type="text/css" href="./app/css/common.css" />
<script type="text/javascript" src="js/jquery-1.11.1.js"></script>
<title></title>
</head>

<body>
<div class="content" id="contentId">
	<img id="appbackgroundId" alt="" src="image/bg01.jpg" style="height: 100%;position: absolute;z-index: -1000;top: 0;left: 0;bottom: 0;right: 0;margin: auto;">
	<div id="userNameId" style="font-size: 40px;color: #fff;height: 10%;background-color: #000;opacity: 0.7;position: fixed;top: 46%;width: 100%;">太阳</div>
	<div style="font-size: 40px;height: 8%;background-color: #b5441b; opacity: 0.4;position: fixed;top: 56%;width: 100%;"></div>
	<div style="height: 16%;background-color: #d9d8d7;position: fixed;top: 64%;width: 100%;opacity: 0.7;">
		<div style="font-size: 16px;margin: 2% 5%;width: 90%;text-align: left;color: #f15a24;">
		<img alt="" width="16px" src="./app/image/icon03.png" />&nbsp;&nbsp;<t id="locationId"></t>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<img alt="" width="16px" src="./app/image/icon04.png" />&nbsp;&nbsp;<t id="occupationId"></t>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<img alt="" width="16px" src="./app/image/icon05.png" />&nbsp;&nbsp;<t id="hobbyId"></t>
		</div>
		<div style="font-size: 18px;margin-top: 2%;width: 90%;text-align: left;margin: 0 5%;" id="descId">
		</div>
	</div>
	<!--
	<div style="height: 8%;background-color: #ff0000;width: 49.9%;position: fixed;top: 82%;">
		<img alt="" src="image/icon01.png" style="width: 16%;margin-top: 6%;" />
	</div>
	<div style="height: 8%;background-color: #ff0000;width: 49.9%;position: fixed;top: 82%;left: 50%;">
		<img alt="" src="image/icon02.png" style="width: 16%;margin-top: 6%;" />
	</div>
	-->
	<div style="position: fixed;top: 90%;width: 100%;height: 10%;background-color: #000;">
		<img style="width: 56%;margin-top: 5%;" alt="logo" src="./app/image/logo02.png" onclick="toAppIndex();">
	</div>
</div>
</body>
<script>
$(function(){
	var cardId = request("cardId");
	loadCard(cardId);
	appAddviewCount(cardId);
	
});
function toAppIndex() {
	window.location.href='${path}/appIndex.jsp';
}
function loadCard(cardId){
	objp= {}
	objp.cardId = cardId;
	   $.ajax({
			  url: '${path}/core/getCardInfoByCardId',
			  type: 'POST',
			  timeout: 30000,
			  cache : false,
		      data :objp,
		      async: false,
			  success:function(msg){
				  $("#appbackgroundId").attr("src",imgDomain+msg.cardInfo.userCard.background);
				 // $("#contentImgId").attr("src",imgDomain+msg.cardInfo.userCard.background);
				  $("#userNameId").html(msg.cardInfo.userCard.name); 
				  $("#locationId").html(msg.cardInfo.userCard.location);
				  $("#occupationId").html(msg.cardInfo.userCard.occupation);
				  $("#hobbyId").html(msg.cardInfo.userCard.hobby);
				  $("#descId").html(msg.cardInfo.userCard.description);
				  
			  },
			   failure:function(msg){
				   //alert(eval('('+msg.responseText+')').error_text);
			   		
			   },
			   error:function(msg){
				   //alert(eval('('+msg.responseText+')').error_text); 
			   }
		});
}
function appAddviewCount(cardId) {
	objp= {}
	objp.cardId = cardId;
	 $.ajax({
		  url: '${path}/core/addviewCount',
		  type: 'POST',
		  timeout: 30000,
		  cache : false,
	      data :objp,
	      async: false,
		  success:function(msg){
			
		  },
		   failure:function(msg){
			   //alert(eval('('+msg.responseText+')').error_text);
		   		
		   },
		   error:function(msg){
			   //alert(eval('('+msg.responseText+')').error_text); 
		   }
	});
}
</script>
</html>
